#!/usr/bin/env python
import numpy as np
import matplotlib.pyplot as plt

data = np.genfromtxt("/home/zxg/be-cu_dp_course/dpgen/run/iter.000000/00.train/000/lcurve.out", names=True)
for name in data.dtype.names[1:-1]:
    plt.plot(data['step'], data[name], label=name)
plt.legend()
plt.xlabel('Step')
plt.ylabel('Loss')
plt.xscale('log')
plt.yscale('log')
plt.savefig('000_lcurve.png')